package br.com.translog.gui.funcionario;

import br.com.translog.fachada.FachadaTranslog;
import br.com.translog.gui.outro.FrmMenuPrincipal;
import br.com.translog.modelo.Funcionario;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JOptionPane;

public class FrmFuncionarioAlterar extends javax.swing.JFrame {

    /**
     * Creates new form FrmFuncionarioAlterar
     */
    public FrmFuncionarioAlterar() {
        initComponents();
        setLocationRelativeTo(null);
    }
    
    //Instanciando os objetos que serao utilizados...
    Funcionario f = null;

    /**
     * This method is called from within the constructor to initialize the form. WARNING: Do NOT
     * modify this code. The content of this method is always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlFuncionarioAlterar = new javax.swing.JPanel();
        lblAlterarFuncionario = new javax.swing.JLabel();
        lblMatricula = new javax.swing.JLabel();
        lblFuncionario = new javax.swing.JLabel();
        lblNome = new javax.swing.JLabel();
        lblRG = new javax.swing.JLabel();
        lblCPF = new javax.swing.JLabel();
        lblSexo = new javax.swing.JLabel();
        lblEstadoCivil = new javax.swing.JLabel();
        lblDataNascimento = new javax.swing.JLabel();
        lblEndereco = new javax.swing.JLabel();
        lblNumero = new javax.swing.JLabel();
        lblComplemento = new javax.swing.JLabel();
        lblBairro = new javax.swing.JLabel();
        lblCidade = new javax.swing.JLabel();
        lblCEP = new javax.swing.JLabel();
        lblEstado = new javax.swing.JLabel();
        lblTelefoneResidecial = new javax.swing.JLabel();
        lblTelefoneCelular = new javax.swing.JLabel();
        lblCargo = new javax.swing.JLabel();
        lblDataAdmissao = new javax.swing.JLabel();
        lblSenha = new javax.swing.JLabel();
        lblEmailEmpresarial = new javax.swing.JLabel();
        lblBanco = new javax.swing.JLabel();
        lblAgencia = new javax.swing.JLabel();
        lblNumeroConta = new javax.swing.JLabel();
        lblTipoConta = new javax.swing.JLabel();
        lblSalario = new javax.swing.JLabel();
        txtMatricula = new javax.swing.JTextField();
        txtFuncionario = new javax.swing.JTextField();
        txtNome = new javax.swing.JTextField();
        txtRG = new javax.swing.JTextField();
        txtCPF = new javax.swing.JTextField();
        txtDataNascimento = new javax.swing.JTextField();
        txtEndereco = new javax.swing.JTextField();
        txtNumero = new javax.swing.JTextField();
        txtComplemento = new javax.swing.JTextField();
        txtCEP = new javax.swing.JTextField();
        txtTelefoneResidecial = new javax.swing.JTextField();
        txtTelefoneCelular = new javax.swing.JTextField();
        txtDataAdmissao = new javax.swing.JTextField();
        txtEmailEmpresarial = new javax.swing.JTextField();
        txtBanco = new javax.swing.JTextField();
        txtAgencia = new javax.swing.JTextField();
        txtNumeroConta = new javax.swing.JTextField();
        txtSalario = new javax.swing.JTextField();
        pwdSenha = new javax.swing.JPasswordField();
        cmbSexo = new javax.swing.JComboBox();
        cmbEstadoCivil = new javax.swing.JComboBox();
        cmbBairro = new javax.swing.JComboBox();
        cmbCidade = new javax.swing.JComboBox();
        cmbEstado = new javax.swing.JComboBox();
        cmbCargo = new javax.swing.JComboBox();
        cmbTipoConta = new javax.swing.JComboBox();
        btnPesquisar = new javax.swing.JButton();
        btnAtualizar = new javax.swing.JButton();
        btnCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        pnlFuncionarioAlterar.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        pnlFuncionarioAlterar.setMaximumSize(null);

        lblAlterarFuncionario.setFont(new java.awt.Font("Tahoma", 1, 15)); // NOI18N
        lblAlterarFuncionario.setText("ALTERAR FUNCIONARIO");
        lblAlterarFuncionario.setName(""); // NOI18N

        lblMatricula.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblMatricula.setText("Matrícula");

        lblFuncionario.setText("Funcionário Nº");

        lblNome.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblNome.setText("Nome");

        lblRG.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblRG.setText("RG");

        lblCPF.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblCPF.setText("CPF");

        lblSexo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblSexo.setText("Sexo");

        lblEstadoCivil.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEstadoCivil.setText("Estado Civil");

        lblDataNascimento.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblDataNascimento.setText("Data Nascimento");

        lblEndereco.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEndereco.setText("Endereço");

        lblNumero.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblNumero.setText("Número");

        lblComplemento.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblComplemento.setText("Complemento");

        lblBairro.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblBairro.setText("Bairro");

        lblCidade.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblCidade.setText("Cidade");

        lblCEP.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblCEP.setText("CEP");

        lblEstado.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEstado.setText("Estado");

        lblTelefoneResidecial.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblTelefoneResidecial.setText("Telefone Residencial");

        lblTelefoneCelular.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblTelefoneCelular.setText("Telefone Celular");

        lblCargo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblCargo.setText("Cargo");

        lblDataAdmissao.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblDataAdmissao.setText("Data Admissão");

        lblSenha.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblSenha.setText("Senha");

        lblEmailEmpresarial.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEmailEmpresarial.setText("Email Empresarial");

        lblBanco.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblBanco.setText("Banco");

        lblAgencia.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblAgencia.setText("Agência");

        lblNumeroConta.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblNumeroConta.setText("Número Conta");

        lblTipoConta.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblTipoConta.setText("Tipo Conta");

        lblSalario.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblSalario.setText("Salário");

        txtFuncionario.setEditable(false);

        cmbSexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SELECIONE A OPCAO", "FEMININO", "MASCULINO" }));

        cmbEstadoCivil.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SELECIONE A OPCAO", "CASADO(A)", "SOLTEIRO(A)", " " }));

        cmbBairro.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SELECIONE A OPCAO", "AFLITOS", "AFOGADOS", "AGUA FRIA", "AGUAS COMPRIDAS", "AGUAZINHA", "ALTO 13 DE FEVEREIRO", "ALTO DA BONDADE", "ALTO DA BRASILEIRA", "ALTO DA CONQUISTA", "ALTO DA FOICE", "ALTO DA SAUDADE", "ALTO DA TELHA", "ALTO DO BRASIL", "ALTO DO BURITY", "ALTO DO CAPITAO", "ALTO DO CARROCEIRO", "ALTO DO CEU", "ALTO DO DEODATO", "ALTO DO EUCALIPTO", "ALTO DO FORMOSO", "ALTO DO MANDU", "ALTO DO PASCOAL", "ALTO DO PROGRESSO", "ALTO DO RESERVATORIO", "ALTO DO SOL NASCENTE", "ALTO DOS COQUEIROS", "ALTO JOSE BONIFACIO", "ALTO JOSE DO PINHO", "ALTO SANTA ISABEL", "ALTO SANTA TERESINHA", "ALTO VISCONDE GARRET", "AMARO BRANCO", "AMPARO", "APIPUCOS", "AREIAS", "ARRUDA", "ARTHUR LUNDGREN I", "ARTHUR LUNDGREN II", "BAIRRO NOVO", "BARRA DE JANGADA", "BARREIRA DO ROSARINHO", "BARRO", "BEBERIBE", "BEIRA RIO", "BENFICA", "BOA VIAGEM", "BOA VISTA", "BOMBA DO HEMETERIO", "BOMBA GRANDE", "BONGI", "BONSUCESSO", "BRASILIA TEIMOSA", "BREJO DA GUABIRABA", "BREJO DE BEBERIBE", "BULHOES", "BULTRINS", "BURITI", "CABANGA", "CACOTE", "CAIXA D AGUA", "CAJUEIRO SECO", "CAJUEIRO", "CAMPINA DO BARRETO", "CAMPO GRANDE", "CANDEIAS", "CAPUNGA", "CARMO", "CASA AMARELA", "CASA CAIADA", "CASA FORTE", "CAVALEIRO", "CAXANGA", "CENTRO", "CIDADE UNIVERSITARIA", "COELHOS", "COHAB", "CONJUNTO MARCOS FREIRE", "CONJUNTO MURIBECA", "COQUE", "COQUEIRAL", "CORDEIRO", "CORREGO DA AREIA", "CORREGO DA BICA", "CORREGO DO BARTOLEMEU", "CORREGO DO CARUA", "CORREGO DO EUCLIDES", "CORREGO DO JENIPAPO", "CORREGO DO JOAQUIM", "CURADO", "DERBY", "DOIS IRMAOS", "DOIS UNIDOS", "ENCRUZILHADA", "ENGENHO DO MEIO", "ENGENHO MARANGUAPE", "ENGENHO VELHO", "ESPINHEIRO", "ESTANCIA", "FLORIANO", "FRAGOSO", "FUNDAO", "GRACAS", "GUABIRABA", "GUADALUPE", "HIPODROMO", "IBURA", "ILHA DE DEUS", "ILHA DO LEITE", "ILHA DO RETIRO", "ILHA JOANA BEZERRA", "IMBIRIBEIRA", "INOCOOP", "IPIRANGA", "IPSEP", "IPUTINGA", "JABOATAO", "JAGUARANA", "JAGUARIBE", "JANGA", "JAQUEIRA", "JARDIM ATLANTICO", "JARDIM BEIRA RIO", "JARDIM BOA VIAGEM", "JARDIM BOTANICO", "JARDIM BRASIL", "JARDIM DOM BOSCO", "JARDIM EUROPA", "JARDIM IMBIRIBEIRA", "JARDIM JUCARA", "JARDIM MARANGUAPE", "JARDIM SANTO ANTONIO", "JARDIM SAO PAULO", "JARDIM SAO SEBASTIAO", "JARDIM VELHO", "JIQUIA", "JOANA BEZERRA", "JORDAO", "LINHA DO TIRO", "MACAXEIRA", "MADALENA", "MANASSU", "MANGABEIRA", "MANGUEIRA", "MARANGUAPE I", "MARANGUAPE II", "MILAGRES", "MIRUEIRA", "MONTE", "MONTEIRO", "MORRO DA CONCEICAO", "MURIBECA DOS GUARARAPES", "MURIBEQUINHA", "MUSTARDINHA", "NOBRE", "NOSSA SENHORA DA CONCEICAO", "NOSSA SENHORA DO O", "NOVA DESCOBERTA", "OURO PRETO", "PAISSANDU", "PARNAMIRIM", "PARQUE DO JANGA", "PASSARINHO", "PAU AMARELO", "PAU FERRO", "PEIXINHOS", "PIEDADE", "PINA", "PINHEIRO", "POCO DA PANELA", "PONTE D UCHOA", "PONTO DE PARADA", "PORTO DA MADEIRA", "POTY", "PRADO", "PRAZERES", "RECIFE", "RIO DOCE", "ROSARINHO", "SALGADINHO", "SAN MARTIN", "SANCHO", "SANTA TEREZA", "SANTANA", "SANTO ALEIXO", "SANTO AMARO", "SANTO ANTONIO", "SAO BENEDITO", "SAO JOSE", "SAPUCAIA", "SETUBAL", "SITIO DOS PINTOS", "SITIO NOVO", "SOCORRO", "SOLEDADE", "TABAJAR", "TABAJARA", "TAMARINEIRA", "TEJIPIO", "TORRE", "TORREAO", "TORRES GALVAO", "TORROES", "TOTO", "VARADOURO", "VARGEM FRIA", "VARZEA", "VASCO DA GAMA", "VILA CARDEAL E SILVA", "VILA DO SESI", "VILA POPULAR", "VILA RICA", "VILA TAMANDARE", "VISTA ALEGRE", "ZUMBI" }));

        cmbCidade.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SELECIONE A OPCAO", "ABREU E LIMA", "AFOGADOS DA INGAZEIRA", "AFRANIO", "AGRESTINA", "AGUA PRETA", "AGUAS BELAS", "ALAGOINHA", "ALIANCA", "ALTINHO", "AMARAJI", "ANGELIM", "ARACOIABA", "ARARIPINA", "ARCOVERDE", "BARRA DE GUABIRABA", "BARREIROS", "BELEM DE MARIA", "BELEM DE SAO FRANCISCO", "BELO JARDIM", "BETANIA", "BEZERROS", "BODOCO", "BOM CONSELHO", "BOM JARDIM", "BONITO", "BREJAO", "BREJINHO", "BREJO DA MADRE DE DEUS", "BUENOS AIRES", "BUIQUE", "CABO DE SANTO AGOSTINHO", "CABROBO", "CACHOEIRINHA", "CAETES", "CALCADO", "CALUMBI", "CAMARAGIBE", "CAMOCIM DE SAO FELIX", "CAMUTANGA", "CANHOTINHO", "CAPOEIRAS", "CARNAIBA", "CARNAUBEIRA DA PENHA", "CARPINA", "CARUARU", "CASINHAS", "CATENDE", "CEDRO", "CHA DE ALEGRIA", "CHA GRANDE", "CONDADO", "CORRENTES", "CORTES", "CUMARU", "CUPIRA", "CUSTODIA", "DORMENTES", "ESCADA", "EXU", "FEIRA NOVA", "FERNANDO DE NORONHA", "FERREIROS", "FLORES", "FLORESTA", "FREI MIGUELINHO", "GAMELEIRA", "GARANHUNS", "GLORIA DO GOITA", "GOIANA", "GRANITO", "GRAVATA", "IATI", "IBIMIRIM", "IBIRAJUBA", "IGARASSU", "IGUARACI", "INAJA", "INGAZEIRA", "IPOJUCA", "IPUBI", "ITACURUBA", "ITAIBA", "ITAMARACA", "ITAMBE", "ITAPETIM", "ITAPISSUMA", "ITAQUITINGA", "JABOATAO DOS GUARARAPES", "JAQUEIRA", "JATAUBA", "JATOBA", "JOAO ALFREDO", "JOAQUIM NABUCO", "JUCATI", "JUPI", "JUREMA", "LAGOA DO CARRO", "LAGOA DO ITAENGA", "LAGOA DO OURO", "LAGOA DOS GATOS", "LAGOA GRANDE", "LAJEDO", "LIMOEIRO", "MACAPARANA", "MACHADOS", "MANARI", "MARAIAL", "MIRANDIBA", "MOREILANDIA", "MORENO", "NAZARE DA MATA", "OLINDA", "OROBO", "OROCO", "OURICURI", "PALMARES", "PALMEIRINA", "PANELAS", "PARANATAMA", "PARNAMIRIM", "PASSIRA", "PAUDALHO", "PAULISTA", "PEDRA", "PESQUEIRA", "PETROLANDIA", "PETROLINA", "POCAO", "POMBOS", "PRIMAVERA", "QUIPAPA", "QUIXABA", "RECIFE", "RIACHO DAS ALMAS", "RIBEIRAO", "RIO FORMOSO", "SAIRE", "SALGADINHO", "SALGUEIRO", "SALOA", "SANHARO", "SANTA CRUZ", "SANTA CRUZ DA BAIXA VERDE", "SANTA CRUZ DO CAPIBARIBE", "SANTA FILOMENA", "SANTA MARIA DA BOA VISTA", "SANTA MARIA DO CAMBUCA", "SANTA TEREZINHA", "SAO BENEDITO DO SUL", "SAO BENTO DO UNA", "SAO CAITANO", "SAO JOAO", "SAO JOAQUIM DO MONTE", "SAO JOSE DA COROA GRANDE", "SAO JOSE DO BELMONTE", "SAO JOSE DO EGITO", "SAO LOURENCO DA MATA", "SAO VICENTE FERRER", "SERRA TALHADA", "SERRITA", "SERTANIA", "SIRINHAEM", "SOLIDAO", "SURUBIM", "TABIRA", "TACAIMBO", "TACARATU", "TAMANDARE", "TAQUARITINGA DO NORTE", "TEREZINHA", "TERRA NOVA", "TIMBAUBA", "TORITAMA", "TRACUNHAEM", "TRINDADE", "TRIUNFO", "TUPANATINGA", "TUPARETAMA", "VENTUROSA", "VERDEJANTE", "VERTENTE DO LERIO", "VERTENTES", "VICENCIA", "VITORIA DE SANTO ANTAO", "XEXEU" }));

        cmbEstado.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SELECIONE A OPCAO", "ACRE", "ALAGOAS", "AMAPA", "AMAZONAS", "BAHIA", "CEARA", "DISTRITO FEDERAL", "ESPIRITO SANTO", "GOIAS", "MARANHAO", "MATO GROSSO", "MATO GROSSO DO SUL", "MINAS GERAIS", "PARA", "PARAIBA", "PARANA", "PERNAMBUCO", "PIAUI", "RIO DE JANEIRO", "RIO GRANDE DO NORTE", "RIO GRANDE DO SUL", "RONDONIA", "RORAIMA", "SANTA CATARINA", "SAO PAULO", "SERGIPE", "TOCANTINS" }));

        cmbCargo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SELECIONE A OPCAO", "DIRETOR", "ENTREGADOR", "OPERADOR" }));

        cmbTipoConta.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SELECIONE A OPCAO", "CORRENTE", "POUPANCA", "SALARIO" }));

        btnPesquisar.setText("Pesquisar");
        btnPesquisar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPesquisarActionPerformed(evt);
            }
        });

        btnAtualizar.setText("Atualizar");
        btnAtualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAtualizarActionPerformed(evt);
            }
        });

        btnCancelar.setText("Cancelar");
        btnCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlFuncionarioAlterarLayout = new javax.swing.GroupLayout(pnlFuncionarioAlterar);
        pnlFuncionarioAlterar.setLayout(pnlFuncionarioAlterarLayout);
        pnlFuncionarioAlterarLayout.setHorizontalGroup(
            pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                        .addComponent(lblNome)
                        .addGap(18, 18, 18)
                        .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(lblRG)
                        .addGap(18, 18, 18)
                        .addComponent(txtRG, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(lblCPF)
                        .addGap(18, 18, 18)
                        .addComponent(txtCPF, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(lblSexo)
                        .addGap(18, 18, 18)
                        .addComponent(cmbSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                        .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                                .addComponent(lblEstadoCivil)
                                .addGap(18, 18, 18)
                                .addComponent(cmbEstadoCivil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                                .addComponent(lblComplemento)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtComplemento, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(lblBairro)))
                        .addGap(18, 18, 18)
                        .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                                .addComponent(lblDataNascimento)
                                .addGap(18, 18, 18)
                                .addComponent(txtDataNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(lblEndereco))
                            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                                .addComponent(cmbBairro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(lblCidade)))
                        .addGap(18, 18, 18)
                        .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtEndereco)
                            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                                .addComponent(cmbCidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(lblCEP)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                                .addComponent(lblNumero)
                                .addGap(18, 18, 18)
                                .addComponent(txtNumero))
                            .addComponent(txtCEP)))
                    .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                        .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                                .addComponent(lblEstado)
                                .addGap(18, 18, 18)
                                .addComponent(cmbEstado, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlFuncionarioAlterarLayout.createSequentialGroup()
                                    .addComponent(lblDataAdmissao)
                                    .addGap(18, 18, 18)
                                    .addComponent(txtDataAdmissao))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlFuncionarioAlterarLayout.createSequentialGroup()
                                    .addComponent(lblBanco)
                                    .addGap(18, 18, 18)
                                    .addComponent(txtBanco, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(18, 18, 18)
                        .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                                .addComponent(lblTelefoneResidecial)
                                .addGap(18, 18, 18)
                                .addComponent(txtTelefoneResidecial, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(lblTelefoneCelular)
                                .addGap(18, 18, 18)
                                .addComponent(txtTelefoneCelular, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(lblCargo)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(cmbCargo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                                .addComponent(lblSenha)
                                .addGap(18, 18, 18)
                                .addComponent(pwdSenha, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(54, 54, 54)
                                .addComponent(lblEmailEmpresarial)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(txtEmailEmpresarial, javax.swing.GroupLayout.PREFERRED_SIZE, 345, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                                .addComponent(lblAgencia)
                                .addGap(18, 18, 18)
                                .addComponent(txtAgencia, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(lblNumeroConta)
                                .addGap(18, 18, 18)
                                .addComponent(txtNumeroConta)
                                .addGap(18, 18, 18)
                                .addComponent(lblTipoConta)
                                .addGap(18, 18, 18)
                                .addComponent(cmbTipoConta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(lblSalario)
                                .addGap(18, 18, 18)
                                .addComponent(txtSalario, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                        .addGap(324, 324, 324)
                        .addComponent(btnAtualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(46, 46, 46)
                        .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 364, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                        .addComponent(lblMatricula)
                        .addGap(18, 18, 18)
                        .addComponent(txtMatricula, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(btnPesquisar)
                        .addGap(18, 18, 18)
                        .addComponent(lblFuncionario)
                        .addGap(18, 18, 18)
                        .addComponent(txtFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                .addGap(374, 374, 374)
                .addComponent(lblAlterarFuncionario)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlFuncionarioAlterarLayout.setVerticalGroup(
            pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlFuncionarioAlterarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblAlterarFuncionario)
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblMatricula)
                    .addComponent(btnPesquisar)
                    .addComponent(txtMatricula, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblFuncionario)
                    .addComponent(txtFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNome)
                    .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblRG)
                    .addComponent(txtRG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCPF)
                    .addComponent(txtCPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblSexo)
                    .addComponent(cmbSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEstadoCivil)
                    .addComponent(cmbEstadoCivil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblDataNascimento)
                    .addComponent(txtDataNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblEndereco)
                    .addComponent(txtEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblNumero)
                    .addComponent(txtNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblComplemento)
                    .addComponent(txtComplemento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblBairro)
                    .addComponent(cmbBairro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCidade)
                    .addComponent(cmbCidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCEP)
                    .addComponent(txtCEP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEstado)
                    .addComponent(cmbEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTelefoneResidecial)
                    .addComponent(txtTelefoneResidecial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTelefoneCelular)
                    .addComponent(txtTelefoneCelular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCargo)
                    .addComponent(cmbCargo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDataAdmissao)
                    .addComponent(lblEmailEmpresarial)
                    .addComponent(txtEmailEmpresarial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblSenha)
                    .addComponent(pwdSenha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDataAdmissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblBanco)
                    .addComponent(txtBanco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblAgencia)
                    .addComponent(txtAgencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblNumeroConta)
                    .addComponent(txtNumeroConta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTipoConta)
                    .addComponent(cmbTipoConta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblSalario)
                    .addComponent(txtSalario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioAlterarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnAtualizar)
                    .addComponent(btnCancelar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlFuncionarioAlterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlFuncionarioAlterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnPesquisarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPesquisarActionPerformed
                
        try {
            //Verifica se o campo de pesquisa nao esta em "branco"...
            if (!txtMatricula.getText().equals("")) {
                f = FachadaTranslog.getInstFachadaTranslog().consultaFuncionario(Integer.parseInt
                                                                                  (txtMatricula.getText()));
                if (f == null) {
                    JOptionPane.showMessageDialog(null, "Funcionário não Encontrado!");
                } else {
                    //Convertendo as datas para exibicao no JTextField...
                    String dataAdmBanco = new SimpleDateFormat("dd/MM/yyyy").format(f.getDataAdmissao());
                    String dataNascBanco = new SimpleDateFormat("dd/MM/yyyy").format(f.getCodigoPessoaFisica()
                                                                                     .getDataNascimento());
                    //Setando os valores do objeto funcionario nos JTextFields...
                    txtAgencia.setText(String.valueOf(f.getAgenciaConta()));
                    cmbBairro.setSelectedItem(f.getCodigoLogradouro().getCodigoBairro().getNome());
                    txtBanco.setText(f.getBancoConta());
                    txtCEP.setText(String.valueOf(f.getCodigoLogradouro().getCep()));
                    txtCPF.setText(String.valueOf(f.getCodigoPessoaFisica().getCpf()));
                    cmbCargo.setSelectedItem(f.getCargo());
                    cmbCidade.setSelectedItem(String.valueOf(f.getCodigoLogradouro().getCodigoCidade().getNome()));
                    txtComplemento.setText(f.getCodigoLogradouro().getComplemento());
                    txtDataAdmissao.setText(dataAdmBanco);
                    txtDataNascimento.setText(dataNascBanco);
                    txtEmailEmpresarial.setText(f.getEmailEmpresa());
                    txtEndereco.setText(f.getCodigoLogradouro().getEndereco());
                    cmbEstado.setSelectedItem(f.getCodigoLogradouro().getCodigoEstado().getNome());
                    cmbEstadoCivil.setSelectedItem(f.getCodigoPessoaFisica().getEstadoCivil());
                    txtFuncionario.setText(String.valueOf(f.getMatricula()));
                    txtNome.setText(f.getCodigoPessoaFisica().getNome());
                    txtNumero.setText(String.valueOf(f.getCodigoLogradouro().getNumero()));
                    txtNumeroConta.setText(String.valueOf(f.getNumeroConta()));
                    txtRG.setText(String.valueOf(f.getCodigoPessoaFisica().getRg()));
                    txtSalario.setText(String.valueOf(f.getSalario()));
                    pwdSenha.setText(f.getSenha());
                    cmbSexo.setSelectedItem(String.valueOf(f.getCodigoPessoaFisica().getSexo()));
                    txtTelefoneCelular.setText(String.valueOf(f.getCodigoPessoaFisica().getTelefoneCelular()));
                    txtTelefoneResidecial.setText(String.valueOf(f.getCodigoPessoaFisica().getTelefoneResidencial()));
                    cmbTipoConta.setSelectedItem(f.getTipoConta());
                }
                
            } else {
                JOptionPane.showMessageDialog(null, "Dados Obrigatórios não Informados!");
            }
            
        } catch (Exception e) {
        }    
    }//GEN-LAST:event_btnPesquisarActionPerformed

    private void btnAtualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAtualizarActionPerformed
        
        //Instanciando os objetos que serao utilizados...
        Date dataAdmissao;
        Date dataNascimento;

        if (cmbCargo.getSelectedItem().equals("SELECIONE A OPCAO") || cmbEstadoCivil.getSelectedItem().equals("SELECIONE A OPCAO")
                || cmbSexo.getSelectedItem().equals("SELECIONE A OPCAO") || cmbTipoConta.getSelectedItem().equals("SELECIONE A OPCAO")
                || cmbBairro.getSelectedItem().equals("SELECIONE A OPCAO") || cmbCidade.getSelectedItem().equals("SELECIONE A OPCAO")
                || cmbEstado.getSelectedItem().equals("SELECIONE A OPCAO")) {
            
            JOptionPane.showMessageDialog(null, "Preencha os Campos Obrigatórios!");
            
            } else if (txtAgencia.getText().equals("") ||
                    txtBanco.getText().equals("") ||
                    txtCEP.getText().equals("") ||
                    txtCPF.getText().equals("") ||
                    txtComplemento.getText().equals("") ||
                    txtDataAdmissao.getText().equals("") ||
                    txtDataNascimento.getText().equals("") ||
                    txtEmailEmpresarial.getText().equals("") ||
                    txtEndereco.getText().equals("") ||
                    txtNome.getText().equals("") ||
                    txtNumero.getText().equals("") ||
                    txtNumeroConta.getText().equals("") ||
                    txtRG.getText().equals("") ||
                    txtSalario.getText().equals("") ||
                    txtTelefoneCelular.getText().equals("") ||
                    txtTelefoneResidecial.getText().equals("")) {
                
                JOptionPane.showMessageDialog(null, "Preencha os Campos Obrigatórios!");
                              
        } else {
            
            try {
            //Convertendo as datas para o tipo "Date"...
            dataAdmissao = new SimpleDateFormat("dd/MM/yyyy").parse(txtDataAdmissao.getText());
            dataNascimento = new SimpleDateFormat("dd/MM/yyyy").parse(txtDataNascimento.getText());

            //Preenchendo os dados da PessoaFisica...
            f.getCodigoPessoaFisica().setCpf(Long.parseLong(txtCPF.getText()));
            f.getCodigoPessoaFisica().setDataNascimento(dataNascimento);
            f.getCodigoPessoaFisica().setEstadoCivil((String) cmbEstadoCivil.getSelectedItem());
            f.getCodigoPessoaFisica().setNome(txtNome.getText());
            f.getCodigoPessoaFisica().setRg(Long.parseLong(txtRG.getText()));
            f.getCodigoPessoaFisica().setSexo((String) cmbSexo.getSelectedItem());
            f.getCodigoPessoaFisica().setTelefoneCelular(Long.parseLong(txtTelefoneCelular.getText()));
            f.getCodigoPessoaFisica().setTelefoneResidencial(Long.parseLong(txtTelefoneResidecial.getText()));

            //Preenchendo os dados do Logradouro...
            f.getCodigoLogradouro().setCep(Long.parseLong(txtCEP.getText()));
            f.getCodigoLogradouro().setCodigoBairro(FachadaTranslog.getInstFachadaTranslog().validaBairro((String) cmbBairro.getSelectedItem()));
            f.getCodigoLogradouro().setCodigoCidade(FachadaTranslog.getInstFachadaTranslog().validaCidade((String) cmbCidade.getSelectedItem()));
            f.getCodigoLogradouro().setCodigoEstado(FachadaTranslog.getInstFachadaTranslog().validaEstado((String) cmbEstado.getSelectedItem()));
            f.getCodigoLogradouro().setComplemento(txtComplemento.getText());
            f.getCodigoLogradouro().setEndereco(txtEndereco.getText());
            f.getCodigoLogradouro().setNumero(txtNumero.getText());

            //Preenchendo os dados do Funcionario...
            f.setAgenciaConta(Long.parseLong(txtAgencia.getText()));
            f.setBancoConta(txtBanco.getText());
            f.setCargo((String) cmbCargo.getSelectedItem());
            f.setCodigoGrupoAcesso(FachadaTranslog.getInstFachadaTranslog().validaGrupoAcesso((String) cmbCargo.getSelectedItem()));
            f.setDataAdmissao(dataAdmissao);
            f.setEmailEmpresa(txtEmailEmpresarial.getText());
            f.setMatricula(Integer.parseInt(txtFuncionario.getText()));
            f.setNumeroConta(Long.parseLong(txtNumeroConta.getText()));
            f.setSalario(Float.parseFloat(txtSalario.getText()));
            f.setSenha(new String (this.pwdSenha.getPassword()));
            f.setTipoConta((String) cmbTipoConta.getSelectedItem());

            //Passando os objetos para serem persistidos...
            FachadaTranslog.getInstFachadaTranslog().alteraFuncionario(f);
            
            //Limpando os campos...
            this.txtAgencia.setText("");
            this.txtBanco.setText("");
            this.txtCEP.setText("");
            this.txtCPF.setText("");
            this.txtComplemento.setText("");
            this.txtDataAdmissao.setText("");
            this.txtDataNascimento.setText("");
            this.txtEmailEmpresarial.setText("");
            this.txtEndereco.setText("");
            this.txtNome.setText("");
            this.txtNumero.setText("");
            this.txtNumeroConta.setText("");
            this.txtRG.setText("");
            this.txtSalario.setText("");
            this.txtTelefoneCelular.setText("");
            this.txtTelefoneResidecial.setText("");
            this.pwdSenha.setName("");

            //Atribuindo o valor padrao aos combobox...
            this.cmbBairro.setSelectedItem("SELECIONE A OPCAO");
            this.cmbCargo.setSelectedItem("SELECIONE A OPCAO");
            this.cmbCidade.setSelectedItem("SELECIONE A OPCAO");
            this.cmbEstado.setSelectedItem("SELECIONE A OPCAO");
            this.cmbEstadoCivil.setSelectedItem("SELECIONE A OPCAO");
            this.cmbSexo.setSelectedItem("SELECIONE A OPCAO");
            this.cmbTipoConta.setSelectedItem("SELECIONE A OPCAO");

            } catch (Exception e) {
            }
            
        }
    }//GEN-LAST:event_btnAtualizarActionPerformed

    private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarActionPerformed
        
        new FrmMenuPrincipal().setVisible(true);
        this.dispose();
    }//GEN-LAST:event_btnCancelarActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrmFuncionarioAlterar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrmFuncionarioAlterar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrmFuncionarioAlterar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrmFuncionarioAlterar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FrmFuncionarioAlterar().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAtualizar;
    private javax.swing.JButton btnCancelar;
    private javax.swing.JButton btnPesquisar;
    private javax.swing.JComboBox cmbBairro;
    private javax.swing.JComboBox cmbCargo;
    private javax.swing.JComboBox cmbCidade;
    private javax.swing.JComboBox cmbEstado;
    private javax.swing.JComboBox cmbEstadoCivil;
    private javax.swing.JComboBox cmbSexo;
    private javax.swing.JComboBox cmbTipoConta;
    private javax.swing.JLabel lblAgencia;
    private javax.swing.JLabel lblAlterarFuncionario;
    private javax.swing.JLabel lblBairro;
    private javax.swing.JLabel lblBanco;
    private javax.swing.JLabel lblCEP;
    private javax.swing.JLabel lblCPF;
    private javax.swing.JLabel lblCargo;
    private javax.swing.JLabel lblCidade;
    private javax.swing.JLabel lblComplemento;
    private javax.swing.JLabel lblDataAdmissao;
    private javax.swing.JLabel lblDataNascimento;
    private javax.swing.JLabel lblEmailEmpresarial;
    private javax.swing.JLabel lblEndereco;
    private javax.swing.JLabel lblEstado;
    private javax.swing.JLabel lblEstadoCivil;
    private javax.swing.JLabel lblFuncionario;
    private javax.swing.JLabel lblMatricula;
    private javax.swing.JLabel lblNome;
    private javax.swing.JLabel lblNumero;
    private javax.swing.JLabel lblNumeroConta;
    private javax.swing.JLabel lblRG;
    private javax.swing.JLabel lblSalario;
    private javax.swing.JLabel lblSenha;
    private javax.swing.JLabel lblSexo;
    private javax.swing.JLabel lblTelefoneCelular;
    private javax.swing.JLabel lblTelefoneResidecial;
    private javax.swing.JLabel lblTipoConta;
    private javax.swing.JPanel pnlFuncionarioAlterar;
    private javax.swing.JPasswordField pwdSenha;
    private javax.swing.JTextField txtAgencia;
    private javax.swing.JTextField txtBanco;
    private javax.swing.JTextField txtCEP;
    private javax.swing.JTextField txtCPF;
    private javax.swing.JTextField txtComplemento;
    private javax.swing.JTextField txtDataAdmissao;
    private javax.swing.JTextField txtDataNascimento;
    private javax.swing.JTextField txtEmailEmpresarial;
    private javax.swing.JTextField txtEndereco;
    private javax.swing.JTextField txtFuncionario;
    private javax.swing.JTextField txtMatricula;
    private javax.swing.JTextField txtNome;
    private javax.swing.JTextField txtNumero;
    private javax.swing.JTextField txtNumeroConta;
    private javax.swing.JTextField txtRG;
    private javax.swing.JTextField txtSalario;
    private javax.swing.JTextField txtTelefoneCelular;
    private javax.swing.JTextField txtTelefoneResidecial;
    // End of variables declaration//GEN-END:variables
}
